<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="st" uri="http://www.springframework.org/tags" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<!-- start: Meta -->
	<meta charset="utf-8">
	<title>tt</title>
	<meta name="description" content="扑通,标准化火锅">
	<meta name="keyword" content="扑通,标准化火锅">
	<!-- end: Meta -->
	
	<!-- start: Mobile Specific -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- end: Mobile Specific -->
	<c:set var="ctx" value="" /> 
	
	<!-- start: CSS -->
	<link id="bootstrap-style" href="${ctx}/static/css/bootstrap.min.css" rel="stylesheet">
	<link href="${ctx}/static/css/bootstrap-responsive.min.css" rel="stylesheet">
	<link id="base-style" href="${ctx}/static/css/style.css" rel="stylesheet">
	<link id="base-style-responsive" href="${ctx}/static/css/style-responsive.css" rel="stylesheet">
	<link href='${ctx}/static/css/googlecss.css' rel='stylesheet' type='text/css'>
	<!-- end: CSS -->
	
		<link rel="shortcut icon" href="${ctx}/static/img/favicon.ico">
</head>

<body>
		<div class="container-fluid-full">
		<div class="row-fluid">
					
			<div class="row-fluid">
				<div class="login-box">
			 
					<h2>欢迎登陆扑通网后台管理</h2>
					<form id="loginform" class="form-horizontal" action="" method="post">
						<fieldset>
							<div class="input-prepend" title="Username">
								<span class="add-on"><i class="halflings-icon user"></i></span>
								<input class="input-large span10" name="username" id="username" type="text" placeholder="type username"/>
							</div>
							<div class="clearfix"></div>

							<div class="input-prepend" title="Password">
								<span class="add-on"><i class="halflings-icon lock"></i></span>
								<input class="input-large span10" name="password" id="password" type="password" placeholder="type password"/>
							</div>
							<div class="clearfix"></div>
	 							<div class="button-login">	
								<div id="submitbtn"  class="btn btn-primary">登录</div>
							</div>
							<div class="clearfix"></div>
					</form>
					<hr>
				</div><!--/span-->
			</div><!--/row-->
			

	</div><!--/.fluid-container-->
	
		</div><!--/fluid-row-->
	
<!-- start: JavaScript-->
	    
		<script src="${pageContext.request.contextPath}/static/js/jquery-1.9.1.min.js"></script>
    	<script src="${pageContext.request.contextPath}/static/js/jquery-migrate-1.0.0.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery-ui-1.10.0.custom.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.ui.touch-punch.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/modernizr.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/bootstrap.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.cookie.js"></script>
	
		<script src='${pageContext.request.contextPath}/static/js/fullcalendar.min.js'></script>
	
		<script src='${pageContext.request.contextPath}/static/js/jquery.dataTables.min.js'></script>

		<script src="${pageContext.request.contextPath}/static/js/excanvas.js"></script>
	<script src="${pageContext.request.contextPath}/static/js/jquery.flot.js"></script>
	<script src="${pageContext.request.contextPath}/static/js/jquery.flot.pie.js"></script>
	<script src="${pageContext.request.contextPath}/static/js/jquery.flot.stack.js"></script>
	<script src="${pageContext.request.contextPath}/static/js/jquery.flot.resize.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.chosen.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.uniform.min.js"></script>
		
		<script src="${pageContext.request.contextPath}/static/js/jquery.cleditor.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.noty.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.elfinder.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.raty.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.iphone.toggle.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.uploadify-3.1.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.gritter.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.imagesloaded.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.masonry.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.knob.modified.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/jquery.sparkline.min.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/counter.js"></script>
	
		<script src="${pageContext.request.contextPath}/static/js/retina.js"></script>

		<script src="${pageContext.request.contextPath}/static/js/custom.js"></script>
		<script src="${pageContext.request.contextPath}/static/js/main.js"></script>
	<!-- end: JavaScript-->
		<script>
		$(document).ready(function() {
			$("#submitbtn").click(function() {
				formsubmit();
			})
		});
		function formsubmit() {
			var tzuser = $("#username").val();
			var tzpwd = $("#password").val();
			if (tzuser == '' || tzpwd == '') {
				alert("用户名密码不能为空");
				return false;
			}
			var params = new Object();
			params.username = tzuser;
			params.password = tzpwd;
			var url = '/houtai/dologin.do';
			var oo = {};
			oo.url = url;
			oo.params = JSON.stringify(params);

			oo.success = function(data) {
				var result = data.data;
				var issuc = data.responsecode;
				var message =data.message;
				if (issuc == "1") {
					if (result == "0") {
						alert("用户名密码错误");
						return false;
					}else{
						window.location = contextroot + "/houtai/order/list.do";
					}
					  
				} else {
					alert(message);
				}

			};
			oo.error = function() {
				alert("请求失败");
			}
			sendRequest(oo);
		}
	</script>
</body>

</html>